import os
from celery import Celery
from django.conf import settings


# project_name = os.path.split(os.path.abspath('.'))[-1]
import djangoProject

# project_settings = '%s.settings ' % project_name

# 设置环境变量
os.environ.setdefault('DJANGO_SETTINGS_MODULE',"djangoProject.settings")

# 实例化celery
app = Celery("djangoProject")

# 使用django的配置文件进行配置
app.config_from_object('django.conf.settings')
